<template>
    <div>
        <button @click="isShow = !isShow">显示/隐藏元素</button>
        <transition>
            <div class="box animate__animated" v-show="isShow"></div>
        </transition>
    </div>
</template>

<script>
export default {
    name: "App",
    data() {
        return {
            isShow: true,
        };
    },
};
</script>

<style scoped>
.box {
    width: 200px;
    height: 200px;
    background: pink;
}
</style>
